package webModule
{
	import com.greensock.TweenMax;
	import com.touchX.display.AbstractDisplay;
	
	import flash.display.GradientType;
	import flash.display.SpreadMethod;
	import flash.events.Event;
	import flash.geom.Matrix;
	
	public class Footer extends AbstractDisplay
	{
		private var contactInfoPanel:FooterInformation;
		public function Footer()
		{
			super();
			contactInfoPanel=new FooterInformation();
			contactInfoPanel.y=5;
			addChild(contactInfoPanel);
		}
		protected override function added(event:Event):void{
			super.added(event);
			TweenMax.from(this,.5,{y:stage.stageHeight+200});
		}
		protected override function resize(evt:Event=null):void{
			drawBg();
			contactInfoPanel.x=this.width/2-contactInfoPanel.width/2;
		}
		
		
		private function drawBg():void{
			this.graphics.clear();
			this.graphics.beginFill(0x000000);
			this.graphics.drawRect(0,0,stage.stageWidth,50);
			
			var fillType:String = GradientType.LINEAR;
			var colors:Array = [0x000000, 0xffffff];
			var alphas:Array = [100, 100];
			var ratios:Array = [0x00, 0xFF];
			var matr:Matrix = new Matrix();
			matr.createGradientBox(stage.stageWidth/2,1, 0, 0, 0);
			var spreadMethod:String = SpreadMethod.REFLECT;
			this.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);  
			this.graphics.drawRect(0,0,stage.stageWidth,1);
			
			this.graphics.endFill();
		}
	}
}


import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;

class FooterInformation extends Sprite{
	private var infoStr:String="鼎诚创新科技有限公司. 2010-2011 版权所有   电话：0755-2541-1844    传真：0755-8481-0127  手机 :13751102676   地址：深圳市福田区皇岗北路彩电工业区601栋2F";
	public function FooterInformation():void{
		var format:TextFormat=new TextFormat();
		//format.size=11;
		format.color=0x333333;
		format.align=TextFormatAlign.LEFT;
		var info:TextField=new TextField();
		
		info.autoSize=TextFieldAutoSize.LEFT;
		info.defaultTextFormat=format;
		info.text=infoStr;
		addChild(info);
	}
	
}